package Game;

import java.awt.event.KeyEvent;

public class PlayerPong extends PlayerArkanoid
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	boolean teclados;
	
	int up;
	int down;

	
	public PlayerPong(float x, float y, int width, int height, boolean _teclados)
	{
		super(x, y, width, height);
		teclados = _teclados;
		
		if(teclados == true)
		{
			up = KeyEvent.VK_UP;
			down = KeyEvent.VK_DOWN;
		}
		else
		{
			up = KeyEvent.VK_W;
			down = KeyEvent.VK_S;
		}
	}
	
	public void Update(InputManager input)
	{
		if (this.y < 0)
            this.y = 0;
        if (this.y >= 530)
        {
        	this.y = 530;
        }
		
        if (input.ChecarTecla(up))
		{
			this.y -= 7;
		}
        if (input.ChecarTecla(down))
		{
			this.y += 7;
		}
	}
	
	public void Update(int nada)
	{
	
	}
	
	
	
	public void Draw()
	{
	
	}
	
	
}
